/**
 * Created with JetBrains PhpStorm.
 * User: deadlinehlt
 * Date: 13-5-30
 * Time: 下午10:55
 * To change this template use File | Settings | File Templates.
 */
$('.carousel').carousel({
    interval: 5000
})

function emailJudge(){
    var emailInput = document.getElementById("txt_Passport");
    var str = emailInput.value;
    var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)*\.edu.cn$/i;
    var flag = pattern.test(str);
    if(flag){
        emailInput.style.border = '2px solid #468847';
    }else{
        emailInput.style.border = '2px solid #b94a48';
    }
    return flag;
}

function colorBack(){
    var emailInput = document.getElementById("txt_Passport");
    emailInput.style.border = '2px solid #DBDBDB';
}

function SendReg(){
    if(emailJudge()){
        var emailInput = document.getElementById("txt_Passport");
        var str = emailInput.value;
        window.location.href="/register/active?email="+str;
    }else{
    }
}

